function [u] = Forward(t_max,h)
    n = floor(1/h);
    v = 1;
    tau = v*h;
    s = floor(t_max/tau)+1;
    

    length = 2*s+2*n-1;
    
    u = zeros(length, 2);
    u(1:s+n,1) = ones(s+n,1);

    pre =1;
    now =2;
    step = max(1,floor(s/100));
    for t = 2:s
    %    pre = t-1;
    %    now = t;
        for i = t:length-t+1
            if u(i,pre)>=0
                u(i,now)=u(i,pre)-(tau/h)*u(i,pre)*(u(i,pre)-u(i-1,pre));
            else
                u(i,now)=u(i,pre)-(tau/h)*u(i,pre)*(u(i+1,pre)-u(i,pre));
            end
        end
        if mod(t-1,step)
            plot((-1:1/n:1),u(s:length-s+1,now));
            axis([-1,1,-1,2]);
            title(strcat('Nonconserve tmax:',num2str(t_max),' h:',num2str(h)));
            pause(0.04)
        end
        temp = pre;
        pre = now;
        now =temp;
    end
    u = u(s:length-s+1);
    %mesh((),u);
    %axis([-1,1,-1,2]);
    %pause(0.1);
end